home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / f1gplib352.lha / f1gplib_35.2 / doc / f1gp.doc
Text File  |  1995-11-21  |  4KB  |  122 lines

  1. TABLE OF CONTENTS
  2.  
  3. f1gp.library/f1gpAllocQuitNotify
  4. f1gp.library/f1gpCalcChecksum
  5. f1gp.library/f1gpDetect
  6. f1gp.library/f1gpFreeQuitNotify
  7. f1gp.library/f1gpAllocQuitNotify             f1gp.library/f1gpAllocQuitNotify
  8.  
  9.    NAME
  10.     f1gpAllocQuitNotify -- ask to be notified when F1GP quits.
  11.  
  12.    SYNOPSIS
  13.     handle = f1gpAllocQuitNotify( task, signal )
  14.     D0                            A0    D0
  15.  
  16.     APTR f1gpAllocQuitNotify( struct Task *, ULONG );
  17.  
  18.    FUNCTION
  19.     This function allows a task to be notified when F1GP quits.  When
  20.     F1GP quits the 2 parameters are passed directly to Exec Signal(),
  21.     allowing the calling task to pick up the singal on its port using
  22.     Exec Wait().  This can be used to allow programs to quit as soon
  23.     as F1GP quits, remove patches, etc.
  24.  
  25.     A single task should only call this function once, usually during
  26.         initialization.  It DOES NOT require that F1GP is in memory.
  27.  
  28.     This call MUST be matched with a call to f1gpFreeQuitNotify(),
  29.     typically just before the calling task exits.
  30.  
  31.    INPUTS
  32.     task   - pointer to a task, which is usually the calling task
  33.          (ie FindTask(NULL)).
  34.     signal - signal to be sent to the task.
  35.  
  36.    RESULTS
  37.     handle - a pointer to an internal structure if successful,
  38.          otherwise NULL.
  39.  
  40.    SEE ALSO
  41.     f1gpFreeQuitNotify()
  42.  
  43. f1gp.library/f1gpCalcChecksum                   f1gp.library/f1gpCalcChecksum
  44.  
  45.    NAME
  46.     f1gpCalcChecksum -- Compute a standard F1GP file checksum. (V35)
  47.  
  48.    SYNOPSIS
  49.     checksum = f1gpCalcChecksum( data, datasize )
  50.     D0                           A0    D0
  51.  
  52.     ULONG f1gpCalcChecksum( UBYTE *, ULONG );
  53.  
  54.    FUNCTION
  55.     If you intend to alter any of F1GP's files (eg track files), you
  56.     will need to rewrite the 4 byte checksum also (last 4 bytes of file).
  57.     This function calculates the correct checksum from the given input
  58.     data and returns it as a ULONG.
  59.     
  60.    INPUTS
  61.     data     - a pointer to the array of bytes which you intend to save.
  62.     datasize - the size of the data array (in bytes), NOT including the
  63.                    checksum space (4 bytes).
  64.  
  65.    RESULTS
  66.     checksum - the 4 byte checksum that is usually located at the end
  67.            of F1GP's files (ie the last 4 bytes).
  68.  
  69. f1gp.library/f1gpDetect                               f1gp.library/f1gpDetect
  70.  
  71.    NAME
  72.     f1gpDetect -- Inquire whether F1GP is running in memory.
  73.  
  74.    SYNOPSIS
  75.     type = f1gpDetect();
  76.     D0
  77.  
  78.     LONG f1gpDetect( void );
  79.  
  80.    FUNCTION
  81.     This function scans the Exec task lists to determine whether F1GP
  82.     is currently running in memory.  If F1GP is resident then the type
  83.     is returned and HunkStart, Seg1, Seg3 in the F1GPBase structure
  84.     will be updated.  The type is also stored in the F1GPType field
  85.     in the F1GPBase structure.
  86.  
  87.     Each time this function is called the priority of F1GP is set to
  88.     -100, to stop it hogging processor time.
  89.  
  90.    RESULTS
  91.     type -    if F1GP was detected in memory, this will be indicate
  92.         what version of F1GP it is.  This will be one of
  93.         F1GPTYPE_STANDARD, F1GPTYPE_WC or F1GPTYPE_A600WWW.
  94.         If not detected, the value will be 0.
  95.  
  96. f1gp.library/f1gpFreeQuitNotify               f1gp.library/f1gpFreeQuitNotify
  97.  
  98.    NAME
  99.     f1gpFreeQuitNotify -- Free memory after f1gpAllocQuitNotify().
  100.  
  101.    SYNOPSIS
  102.     f1gpFreeQuitNotify( handle )
  103.                         A0
  104.  
  105.     void f1gpFreeQuitNotify( APTR );
  106.  
  107.    FUNCTION
  108.     Frees memory allocated by a call to f1gpAllocQuitNotify(), which
  109.     also means the calling task will no longer be notified when F1GP
  110.         quits.  The pointer passed in MUST have been obtained by
  111.         f1gpAllocQuitNotify().
  112.  
  113.     If NULL is passed in this function does nothing.
  114.  
  115.    INPUTS
  116.     handle - pointer returned from f1gpAllocQuitNotify() or NULL.
  117.  
  118.    SEE ALSO
  119.     f1gpAllocQuitNotify()
  120.  
  121.  
  122.